<html>
<head><meta charset="utf-8"><title>Rename -Cllvm-args to something backend a… compiler-team#421 · t-compiler/major changes · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/index.html">t-compiler/major changes</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html">Rename -Cllvm-args to something backend a… compiler-team#421</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="231777862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231777862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231777862">(Mar 25 2021 at 10:39)</a>:</h4>
<p>A new proposal has been announced: <a href="https://github.com/rust-lang/compiler-team/issues/421">Rename -Cllvm-args to something backend agnostic #421</a>. It will be announced at the next meeting to try and draw attention to it, but usually MCPs are not discussed during triage meetings. If you think this would benefit from discussion amongst the team, consider proposing a design meeting.</p>



<a name="231778478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231778478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231778478">(Mar 25 2021 at 10:44)</a>:</h4>
<p>I prefer the name <code>-Cbackend-args</code>. codegen args is already the (internal) name for the whole <code>-C</code> family.</p>



<a name="231778656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231778656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231778656">(Mar 25 2021 at 10:45)</a>:</h4>
<p>It did be nice if <code>-Cbackend-args</code> would support being passed multiple times with the args being concattenated.</p>



<a name="231778953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231778953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231778953">(Mar 25 2021 at 10:47)</a>:</h4>
<p>Maybe it should also require passing the backend name again to either ignore or error when a different backend is used? It could be something like <code>"-Cbackend-args=llvm:arg1 arg2"</code>.</p>



<a name="231780715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231780715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231780715">(Mar 25 2021 at 11:02)</a>:</h4>
<p>I mean I'm definitely in favour of a smarter version of the flag, but I'd be happy with it as is, just with a different name.</p>
<p>Not sure if requiring the name be passed in would be worth it though unless we'd want people to support multiple backends by always passing all of the arguments for all of the backends they support e.g. <code>-Cbackend-args="llvm:--help cranelift:--help"</code>.</p>



<a name="231792073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231792073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231792073">(Mar 25 2021 at 12:34)</a>:</h4>
<p>Oh wait I see what you meant now. Hmm, maybe that is useful. Though maybe having as its own flag makes more sense like <code>-Cbackend-flavor=cranelift</code> so that it could apply to other things and then <code>-Cllvm-args</code> could expand to just <code>-Cbackend-args="..." -Cbackend-flavor=llvm</code>.</p>



<a name="231792398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231792398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231792398">(Mar 25 2021 at 12:37)</a>:</h4>
<p>We already have <code>-Zcodegen-backend=llvm/cranelift</code>. I was concerned about the case where someone uses <code>RUSTFLAGS</code> to pass one of <code>-Zcodegen-backend</code> or <code>-Cbackend-args</code> and <code>.cargo/config.toml</code> (or a profile in <code>Cargo.toml</code>) for the other flag. In that case you may accidentally end up with a mismatch between expected and actual codegen backend.</p>



<a name="231873278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231873278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> comex <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231873278">(Mar 25 2021 at 20:45)</a>:</h4>
<p>I think “llvm” should be at least somewhere in the argument - if not in the argument name, then as part of the value like <span class="user-mention" data-user-id="133247">@bjorn3</span> suggested.  The options exposed by llvm-args tend to be very low level and implementation specific, so I wouldn’t expect any other backends to have compatibility with them, now or in the future.  As such, it’s good for the compiler to know that the user is trying to pass arguments to LLVM, so it can produce a proper error if a different codegen backend is in use, rather than having that backend complain that the flags are unrecognized.</p>



<a name="231873996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231873996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> comex <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231873996">(Mar 25 2021 at 20:50)</a>:</h4>
<p>Also, I could imagine rustc someday supporting using multiple backends for different functions in the same crate.  (You might want to prioritize runtime performance for some functions and compile time for others.)  In that case, there would need to be a way to specify options for each backend, which also benefits from naming the backend as part of the argument.</p>



<a name="231874327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231874327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> comex <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231874327">(Mar 25 2021 at 20:53)</a>:</h4>
<p>However, if the backend name is part of the argument, using <code>-Cbackend-args=llvm:arg</code> instead of <code>-Cllvm-args=arg</code> feels to me like it’s more verbose for no reason.  Why not just keep <code>-Cllvm-args</code> but change it to only work for LLVM, and add <code>-Ccranelift-args</code> for Cranelift?</p>



<a name="231874512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231874512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231874512">(Mar 25 2021 at 20:54)</a>:</h4>
<p>That would require hard-coding all possible backends in rustc as by the time the codegen backend to use is determined, all arguments have already been parsed.</p>



<a name="231874623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231874623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231874623">(Mar 25 2021 at 20:55)</a>:</h4>
<p>We already have a number of arguments that have 2 levels (<code>--extern=crate=path</code> for example)</p>



<a name="231874780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231874780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> comex <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231874780">(Mar 25 2021 at 20:57)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> Is that such a big deal?</p>



<a name="231874858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231874858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> comex <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231874858">(Mar 25 2021 at 20:57)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> True; on the other hand, <code>-Cllvm-args</code> already exists and adding a new syntax would be not-strictly-necessary churn.</p>



<a name="231874883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231874883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231874883">(Mar 25 2021 at 20:57)</a>:</h4>
<p>there are already a number of out-of-tree backends.</p>



<a name="231875000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231875000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231875000">(Mar 25 2021 at 20:58)</a>:</h4>
<p>The list of possible backends is potentially infinite. In addition how would an unofficial codegen backend be handled? Adding a <code>-C...-args</code> would make it look official and the backend may end up getting abandoned.</p>



<a name="231875010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231875010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231875010">(Mar 25 2021 at 20:58)</a>:</h4>
<p><code>-Cllvm-args</code> doesn't need to be deprecated or removed IMO, it can be transparently rewritten to <code>-Ccodegen-args=llvm=...</code> or similar.</p>



<a name="231875063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/231875063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#231875063">(Mar 25 2021 at 20:59)</a>:</h4>
<p>(My vote is on <code>-Ccg-args</code> or <code>-Ccodegen-args</code>)</p>



<a name="232299587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/232299587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#232299587">(Mar 29 2021 at 16:55)</a>:</h4>
<p>The problem with <code>-Ccodegen-args</code> in my opinion is that <code>-C</code> flags are already called codegen arguments. So this would be the ‘“codegen arguments” codegen argument’, which is why my preference is for something like <code>backend-args</code> or something that has some other distinguishing word than codegen.</p>



<a name="232302094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/232302094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#232302094">(Mar 29 2021 at 17:11)</a>:</h4>
<p><code>-Cbackend-args</code> sounds like a good match for <code>-Zcodegen-backend</code>, especially if the latter is stabilized as <code>-Cbackend</code></p>



<a name="234681755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234681755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234681755">(Apr 15 2021 at 14:07)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="492">@T-compiler</span>: Proposal <a href="https://github.com/rust-lang/compiler-team/issues/421#issuecomment-820450073">#421</a> has been seconded, and will be approved in 10 days if no objections are raised.</p>



<a name="234749009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234749009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nikita Popov <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234749009">(Apr 15 2021 at 20:40)</a>:</h4>
<p>Would it be possible to approach this the other way around, and let the codegen backend deal with all flags under a common prefix? That is <code>-C llvm-*</code> and <code>-C cranelift-*</code>. <code>-C llvm-args</code> is by far not the only LLVM-specific option we have, and it would be a shame if it would be necessary to shove all codegen backend specific configuration under a single flag.</p>



<a name="234758852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234758852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234758852">(Apr 15 2021 at 21:41)</a>:</h4>
<p>are the possible backends a hard-coded list? I don't think it would be good if that has to be open to arbitrary names</p>



<a name="234759342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234759342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234759342">(Apr 15 2021 at 21:45)</a>:</h4>
<p>No, can have arbitrary backend a out of tree too.</p>



<a name="234780230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234780230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234780230">(Apr 16 2021 at 01:22)</a>:</h4>
<p>another option would be to keep <code>-Cllvm-args</code> but also add <code>-Cbackend-args</code> … i.e. truly LLVM specific stuff would continue to be fed via <code>-Cllvm-args</code>, while flags that are generic enough to be shared across backends would be lifted to <code>-Cbackend-args</code> ...</p>



<a name="234780268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234780268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234780268">(Apr 16 2021 at 01:23)</a>:</h4>
<p>(or is there some way that you expect to specify LLVM-specific stuff <em>in</em> the <code>-Cbackend-args</code> list?, in a manner that gets automatically filtered somehow?)</p>



<a name="234782373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234782373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234782373">(Apr 16 2021 at 01:55)</a>:</h4>
<p>I wonder if we should be supporting random arguments without filtering of some kind, I guess maybe the ship has sailed with LLVM at least... but it seems like a clear stability hole, right? We just get away with it because few people set these options.</p>



<a name="234819626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234819626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234819626">(Apr 16 2021 at 09:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421/near/234780230">said</a>:</p>
<blockquote>
<p>another option would be to keep <code>-Cllvm-args</code> but also add <code>-Cbackend-args</code> … i.e. truly LLVM specific stuff would continue to be fed via <code>-Cllvm-args</code>, while flags that are generic enough to be shared across backends would be lifted to <code>-Cbackend-args</code> ...</p>
</blockquote>
<p>For cg_clif I put a couple of flags that will only be supported by cg_clif behind <code>-Cllvm-args</code> like "codegen-mode" which allows chosing between AOT compilation and various JIT modes. <a href="https://github.com/bjorn3/rustc_codegen_cranelift/blob/b477a5472d4530066ad4a2205d24a3830159da6b/src/config.rs#L32-L66">https://github.com/bjorn3/rustc_codegen_cranelift/blob/b477a5472d4530066ad4a2205d24a3830159da6b/src/config.rs#L32-L66</a></p>



<a name="234819739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/234819739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#234819739">(Apr 16 2021 at 09:08)</a>:</h4>
<p>I am fine with putting everything behind <code>-Zunstable-features</code>.</p>



<a name="237697042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Rename%20-Cllvm-args%20to%20something%20backend%20a%E2%80%A6%20compiler-team%23421/near/237697042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Rename.20-Cllvm-args.20to.20something.20backend.20a.E2.80.A6.20compiler-team.23421.html#237697042">(May 06 2021 at 17:24)</a>:</h4>
<p>This proposal has been accepted: <a href="https://github.com/rust-lang/compiler-team/issues/421">#421</a>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>